class AddNonStudentAsUserType < ActiveRecord::Migration
  def self.up
    nonstudentUserType = UserType.create({:name => "Non Student"})
    allcategories_not_for_students = Category.find(:all) - UserType.find_by_stripped_name("student").categories
    allcategories_not_for_students.each do |category|
      nonstudentUserType.categories << category
    end
  end

  def self.down
    UserType.destroy_all("name = 'Non Student'")
  end
end
